org.eclipse.vtp.framework.interactions.voice.vxml
Class TextOutput

java.lang.Object
  extended by org.eclipse.vtp.framework.interactions.core.support.Widget
      extended by org.eclipse.vtp.framework.interactions.voice.vxml.Output
          extended by org.eclipse.vtp.framework.interactions.voice.vxml.BasicOutput
              extended by org.eclipse.vtp.framework.interactions.voice.vxml.TextOutput
All Implemented Interfaces:
VXMLConstants

public class TextOutput
extends BasicOutput

The TextOutput class wraps raw text that is meant to be rendered to the caller with TTS. A text output can be used anywhere output to the caller can be specified.

Version:
2.0
Author:
Trip Gilman, Lonnie Pryor

Field Summary
 
Fields inherited from interface org.eclipse.vtp.framework.interactions.voice.vxml.VXMLConstants
EMPTY, FILE_EXT_GSL, FILLED_MODE_ALL, FILLED_MODE_ANY, GRAMMAR_MODE_DTMF, GRAMMAR_MODE_VOICE, METHOD_GET, METHOD_POST, MIME_TYPE_GSL, MIME_TYPE_SRGS, NAME_APPLICATION, NAME_ASSIGN, NAME_AUDIO, NAME_BARGEIN, NAME_BEEP, NAME_BLOCK, NAME_BRIDGE, NAME_CATCH, NAME_CHOICE, NAME_COMPLETETIMEOUT, NAME_COND, NAME_CONFIDENCELEVEL, NAME_COUNT, NAME_DEST, NAME_DISCONNECT, NAME_DTMF, NAME_DTMFTERM, NAME_ELSE, NAME_ELSEIF, NAME_ENCTYPE, NAME_ENUMERATE, NAME_ERROR, NAME_EVENT, NAME_EVENTEXPR, NAME_EXIT, NAME_EXPR, NAME_FIELD, NAME_FILLED, NAME_FINALSILENCE, NAME_FORM, NAME_GOTO, NAME_GRAMMAR, NAME_ID, NAME_IF, NAME_INCOMPLETETIMEOUT, NAME_INPUTMODES, NAME_INTERDIGITTIMEOUT, NAME_ITEM, NAME_MAXNBEST, NAME_MAXSPEECHTIMEOUT, NAME_MAXTIME, NAME_MENU, NAME_METHOD, NAME_MODE, NAME_NAME, NAME_NAMELIST, NAME_NEXT, NAME_NOINPUT, NAME_NOMATCH, NAME_ONE_OF, NAME_OPTION, NAME_PARAM, NAME_PROMPT, NAME_PROPERTY, NAME_RECORD, NAME_REPEAT, NAME_REPROMPT, NAME_RETURN, NAME_ROOT, NAME_RULE, NAME_SCOPE, NAME_SCRIPT, NAME_SENSITIVITY, NAME_SPEEDVSACCURACY, NAME_SRC, NAME_SUBDIALOG, NAME_SUBMIT, NAME_TERMCHAR, NAME_TERMTIMEOUT, NAME_THROW, NAME_TIMEOUT, NAME_TRANSFER, NAME_TYPE, NAME_VALUE, NAME_VAR, NAME_VERSION, NAME_VXML, NAMESPACE_URI_VXML, QNAME_XML_LANG, SCOPE_DIALOG, SCOPE_DOCUMENT, TYPE_CDATA, VERSION_2_0
 
Constructor Summary
TextOutput()
          Creates a new instance of TextOutput with no text to render.
TextOutput(java.lang.String text)
          Creates a new instance of TextOutput with the specified text to render with TTS.
 
Method Summary
 java.lang.String getText()
          Returns the current text to render with TTS.
 void setText(java.lang.String text)
          Sets the text of this TextOutput to render with TTS.
protected  void writeText(org.xml.sax.ContentHandler outputHandler)
          Write the text of this output to the supplied content handler.
 void writeWidget(org.xml.sax.ContentHandler outputHandler)
          Writes the content of this widget to an XML content handler.
 
Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextOutput

public TextOutput()
Creates a new instance of TextOutput with no text to render.


TextOutput

public TextOutput(java.lang.String text)
           throws java.lang.NullPointerException
Creates a new instance of TextOutput with the specified text to render with TTS.

Parameters:
text - The text to render with TTS.
Throws:
java.lang.NullPointerException - If the supplied text is null.
Method Detail

getText

public java.lang.String getText()
Returns the current text to render with TTS.

Returns:
the current text to render with TTS.

setText

public void setText(java.lang.String text)
             throws java.lang.NullPointerException
Sets the text of this TextOutput to render with TTS.

Parameters:
text - The new text to render with TTS.
Throws:
java.lang.NullPointerException - If the supplied text is null.

writeWidget

public void writeWidget(org.xml.sax.ContentHandler outputHandler)
                 throws java.lang.NullPointerException,
                        org.xml.sax.SAXException
Description copied from class: Widget
Writes the content of this widget to an XML content handler.

Specified by:
writeWidget in class Widget
Parameters:
outputHandler - The handler to write this widget to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of this widget fails.

writeText

protected void writeText(org.xml.sax.ContentHandler outputHandler)
                  throws java.lang.NullPointerException,
                         org.xml.sax.SAXException
Write the text of this output to the supplied content handler.

Parameters:
outputHandler - The content handler to write to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of the script text fails.